package jk.framework.spring.cloud.canary.loadbalancer.comonpent;

import jk.framework.canary.core.po.RouteContext;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.Request;
import org.springframework.cloud.client.loadbalancer.RequestData;

/**
 * @author cuichao
 */
public interface LoadBalanceRouteContextFactory {
    /**
     * 金丝雀负载均衡上下文工厂
     * @param instance
     * @param request
     * @return
     */
    RouteContext<RequestData> getContext(ServiceInstance instance, Request request);
}
